package navigation;

/**
 *
 * @author hyurah
 */

public class GoToExitHardcodedNavigator extends Navigator{

	private PathQueue way = new PathQueue();

	public GoToExitHardcodedNavigator() {
		way.pushPoint(new PathPoint(0, 0, Direction.FORWARD));
		way.pushPoint(new PathPoint(0, 0, Direction.FORWARD));
		way.pushPoint(new PathPoint(0, 0, Direction.RIGHT));
		way.pushPoint(new PathPoint(0, 0, Direction.FORWARD));
		way.pushPoint(new PathPoint(0, 0, Direction.RIGHT));
		way.pushPoint(new PathPoint(0, 0, Direction.FORWARD));
		way.pushPoint(new PathPoint(0, 0, Direction.FORWARD));
		way.pushPoint(new PathPoint(0, 0, Direction.FORWARD));
		way.pushPoint(new PathPoint(0, 0, Direction.LEFT));
		way.pushPoint(new PathPoint(0, 0, -1));
	}

	public int decideDirection() throws IllegalMapStateException {
		return way.getPoint(0).getDirection();
	}

	public void moveOneStep() throws IllegalMoveException {
		way.popPoint();
	}

	public boolean fieldIsKnown() {
		return true;
	}

}
